Manages the rendering contexts available in the component. More...
Public Member Functions | |
| ~RenderContextManager () | |
| const std::unordered_map< void *, RenderContext * > & | getRenderContextMap () const |
| RenderContext * | getRenderContextOf (nkWinUi::GraphicsWindow *win) const |
| RenderContext * | getActiveRenderContext () const |
| RenderContext * | getDefaultRenderContext () const |
| RenderContext * | createRenderContext (const RenderContextDescriptor &contextDesc) |
| RenderContext * | createRenderContextAndWindowFromConfig () |
| void | activateContextOf (nkWinUi::GraphicsWindow *win) |
| void | activateContext (RenderContext *context) |
| void | eraseFor (nkWinUi::GraphicsWindow *win) |
| void | erase (RenderContext *context) |
Manages the rendering contexts available in the component.
The manager is responsible for the memory it allocates. External code should not delete it.
| nkGraphics::RenderContextManager::~RenderContextManager | ( | ) |
Destructor.
| const std::unordered_map<void*, RenderContext*>& nkGraphics::RenderContextManager::getRenderContextMap | ( | ) | const |
| RenderContext* nkGraphics::RenderContextManager::getRenderContextOf | ( | nkWinUi::GraphicsWindow * | win | ) | const |
Retrieves the context associated to a window.
| win | The window which context is needed. |
| RenderContext* nkGraphics::RenderContextManager::getActiveRenderContext | ( | ) | const |
| RenderContext* nkGraphics::RenderContextManager::getDefaultRenderContext | ( | ) | const |
| RenderContext* nkGraphics::RenderContextManager::createRenderContext | ( | const RenderContextDescriptor & | contextDesc | ) |
Creates a render context. Depending on the description, the context will be rendering to a window, or a texture. Based on the description, the window / texture will be created on-the-fly or taken from user specified pointers.
| contextDesc | The description of the context to create. |
| RenderContext* nkGraphics::RenderContextManager::createRenderContextAndWindowFromConfig | ( | ) |
Creates a render context and its window, from the configuration currently set. See ConfigManager.
| void nkGraphics::RenderContextManager::activateContextOf | ( | nkWinUi::GraphicsWindow * | win | ) |
Activates a context and prepares the rendering pipeline for all its defined parameters.
| win | The window from which the context should be activated. |
| void nkGraphics::RenderContextManager::activateContext | ( | RenderContext * | context | ) |
Activates a context and prepares the rendering pipeline for all its defined parameters.
| context | The context to activate. |
| void nkGraphics::RenderContextManager::eraseFor | ( | nkWinUi::GraphicsWindow * | win | ) |
Erases and frees the memory of a context.
| win | The window from which the context should be deleted. |
| void nkGraphics::RenderContextManager::erase | ( | RenderContext * | context | ) |
Erases and frees the memory of a context.
| context | The context to free. |